Imports System.Threading

Namespace Schedules

    Public Class Scheduler
        Private m_configuration As SchedulerConfiguration = Nothing

        Public Sub Start()
            While (True)
                Try
                    For Each job As ISchedulerJob In m_configuration.Jobs
                        job.Execute()
                    Next
                Catch ex As Exception

                Finally
                    Thread.Sleep(m_configuration.SleepInterval)
                End Try
            End While

        End Sub    

        Public Sub New(ByVal config As SchedulerConfiguration)
            m_configuration = config
        End Sub
    End Class

End Namespace